<!--
 * @Author         : yanyongyu
 * @Date           : 2022-09-23 12:43:58
 * @LastEditors    : yanyongyu
 * @LastEditTime   : 2022-10-06 03:56:51
 * @Description    : None
 * @GitHub         : https://github.com/yanyongyu
-->

{% from "icons/branch.html.jinja" import octicon_branch %}

{% macro head_ref_deleted(event, ns) %}
{% set pull_request = get_pull_request(ns.issue) %}
<div class="TimelineItem">
  <div class="TimelineItem-badge">
    {{ octicon_branch() }}
  </div>
  <div class="TimelineItem-body">
    <a>
      <img class="avatar avatar-user" height="20" width="20" src="{{ event.actor.avatar_url }}" />
    </a>
    <a class="author Link--primary text-bold">{{ event.actor.login|escape }}</a>
    deleted the
    <span class="branch-name css-truncate color-fg-muted">
      <a class="no-underline">
        {{ pull_request.head.ref|escape }}
      </a>
    </span>
    branch
    <a class="Link--secondary">{{ event.created_at|relative_time }}</a>
  </div>
</div>
{% endmacro %}
